package com.example.pacs.controller;

import com.example.pacs.service.HomeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/home")
@Slf4j
public class HomeController {

    @Resource
    private HomeService homeService;

    @GetMapping(value = "/getInstanceDetails/{instanceId}")
    public ResponseEntity<byte[]> getInstanceDetails(@PathVariable Long instanceId) {
        log.info("获取实例详情接收参数:{}", instanceId);
        return homeService.getInstanceDetails(instanceId);
    }
}
